home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / db / esm-3.1 / esm-3 / usr / local / sm / src / client / include / btree.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-05-05  |  1.8 KB  |  78 lines

  1. #ifndef _BTREE_H_
  2. #define _BTREE_H_
  3. /*
  4.  *   $RCSfile: btree.h,v $  
  5.  *   $Revision: 1.1.1.1 $  
  6.  *   $Date: 1996/05/04 21:55:19 $      
  7.  */ 
  8. #ifndef __BTREE_H__
  9. #define __BTREE_H__
  10.  
  11. /* BEGIN visible to user */
  12.  
  13. typedef struct {
  14.     BOOL valid;
  15.     PID  rootPID;
  16.     PID  page;
  17.     TWO  slotNum;
  18.     TWO  index;
  19. } BT_CURSOR;
  20.  
  21.  
  22. typedef struct {
  23.     IID     ndx;                /* index id */
  24.     char    b2[SM_MAXKEYLEN];   /* bound2 (must be aligned) */
  25.     int     b2len;              /* length of bound2 */
  26.     int     groupIndex;
  27.     SMCOND  cond2;
  28.     BOOL    eof;        /* TRUE if end of file reached */
  29.     union {
  30.     BT_CURSOR   btCursor;
  31.     } opaque;
  32. } SMCURSOR;
  33.  
  34.  
  35. typedef struct {
  36.     TWO     length;         /* length of the key */
  37.     void*   valuePtr;       /* pointer to value of the key */
  38. } KEY;
  39.  
  40. /* END visible to user */
  41.  
  42. #define SMNDXLOADDESCMAGIC     0x42891393
  43. typedef struct {
  44.     long    magic;
  45.     TID        tid;
  46.     VOLID    volid;
  47.     FID        tmpFid;        /* file to store temporary results */
  48.     int     groupIndex;
  49.     GROUPLINK*    ndxDescLink;
  50.     IID        iid;
  51.     int        runSize;    /* size of each slotted runs */
  52.     int        offset;        /* index into buffer */
  53.     OID*    runList;    /* oids of the first rec of each run */
  54.     int        runMax;        /* size of runList */
  55.     int        runCount;    /* number of valid runs in runList */
  56.     int        recCount;    /* number of records for this run */
  57.     int        totalRec;    /* total number of records */
  58.     int        maxKeyLen;      /* maximum length of all keys inserted */
  59.     int        numPages;
  60.     KEY*    keys;
  61.     INDEXDESC    ndesc;
  62.     char*    buffer;        /* malloc space to sort runs */
  63. } SMNDXLOADDESC;
  64.  
  65.  
  66. typedef struct {
  67.     int        runSize;
  68.     int        elSize;
  69.     int        offset;
  70.     int        recCnt;
  71.     char*    buffer;
  72. } SMBUFINSERTDESC;
  73.  
  74. extern SMBUFINSERTDESC bufInsTbl[];
  75.  
  76. #endif /* __BTREE_H__ */
  77. #endif /* _BTREE_H_ */
  78.